1. Field of the Invention
The present invention relates to a redundant array of independent disk (RAID) system, and a disk controller thereof having a function of converting check codes added to data stored in disk drives into new check codes.
2. Description of the Related Art
Hitherto, to ensure the data integrity, when writing data from a server to a disk drive, check codes are added to each block of the data, the data being input or output in units of data blocks. When reading data from a disk drive to a server, the consistency of the data with the check codes is checked to ensure the integrity of the data.
In a RAID device, for example, in case of disk failures, many disk drives are installed and data is redundantly stored in a plurality of disks. In the RAID device, in order to detect data abnormalities in the case of any disk failure, when writing data, check codes are added, and when reading the data, the consistency of the data with the check codes is checked to guarantee the integrity of the data.
When checking data, various check codes or checking formats were used dependent on individual companies. However, in response to an increasing demand for RAID devices, check codes or checking formats are now standardized and are used for various control chips.
FIG. 10 illustrates an example of data checking conducted in a RAID device 540 including a RAID controller 510 and a disk drive 520.
When writing data from a server 530 to the disk drive 520, check codes are added to the data by the RAID controller 510. It is now assumed that data is 512-byte block data and check codes are 8-byte block check codes (BCC). The RAID controller 510 temporarily stores data provided with check codes in a cache 511 and then writes the data from the cache 511 to the disk drive 520.
When reading data, the RAID controller 510 reads out data provided with check codes from the disk drive 520 to the cache 511 and then checks the consistency of the data with the check codes. If the integrity of the data is verified, the RAID controller 510 removes the check codes from the data and then transfers the resulting data to the server 530.
In an existing RAID device, to support a new interface (for example, when replacing an Fiber Channel 2Gbps interface by an Fiber Channel 4Gbps interface), it is necessary to install a disk controller having new chips.
In this case, if check codes are also changed, data stored in an existing disk drive cannot be correctly checked.
Additionally, the check logic of check codes is dependent on the hardware of a disk controller. Accordingly, replacing the hardware of the disk controller by new hardware may change the check logic. Accordingly, when supporting a new interface in an existing RAID device, it is necessary to convert check codes so that the data integrity can be correctly verified.
Japanese Unexamined Patent Application Publication No. 48-066334 discloses a technique for converting error correcting codes (ECC) into parities when transferring data between a memory and an input/output (I/O) interface. In this technique, check codes are converted when sending and receiving data between different media (for example, a memory and a transmission channel).
Japanese Unexamined Patent Application Publication No. 2003-345530 discloses a maintenance technique for a disk (RAID) system, and more specifically, a technique for converting data from a host into a data format that can be handled in the disk system.